package com.graduation.mybatis.service;

import com.graduation.mybatis.bean.DietRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import com.graduation.mybatis.bean.DietRecordVO;
import com.graduation.mybatis.bean.NutritionSummary;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
* @author 23726
* @description 针对表【diet_record】的数据库操作Service
* @createDate 2025-04-07 18:59:01
*/
public interface DietRecordService extends IService<DietRecord> {
    boolean removeByrecordIdAndFoodEntryId(Long foodEntryId);
    List<DietRecordVO> getDailyRecords(Long userId, Integer mealType, LocalDate date);
    NutritionSummary calculateNutritionSummary(List<DietRecordVO> records);
    List<DietRecordVO> getRecordsByUserId(Long userId, LocalDate date);
    Map<Integer, NutritionSummary> getDailyMealSummaries(Long userId, LocalDate date);
    Map<Integer, NutritionSummary> getPeriodyMealSummaries(Long userId, Integer period, String date);
}
